import { useState } from 'react';

const useSelect = () => {
   const [selectedKeys, setSelectedKeys] = useState([]);
   const rowSelection = {
      onChange: (selectedKeys) => {
         setSelectedKeys(selectedKeys);
      },
      selectedRowKeys: selectedKeys,
   };

   return { selectedKeys, rowSelection, setSelectedKeys };
};

export default useSelect;
